#UNITY_ROOT=/Applications/Unity/2021.3.45f1
UNITY_ROOT=/Applications/Unity/Hub/Editor/2021.3.45f1
UNITY=$UNITY_ROOT/Unity.app/Contents/MacOS/Unity
PROJECT_PATH=$1
BUILD_METHOD=BuildTools.$2

echo build-unity -Begin
$UNITY -quit -batchmode -projectPath "${PROJECT_PATH}" -logFile - -executeMethod "${BUILD_METHOD}" || exit 1
echo build-unity -End